{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "source": [
    "str1 = 'gRade-third'\r\n",
    "print(str1.lower())\r\n",
    "print(str1.upper())\r\n",
    "print(str1.title())\r\n",
    "# help(str1.lower)\r\n",
    "# str1.lower ?\r\n",
    "# help\r\n",
    "a = str1.split('-')\r\n",
    "print(a)\r\n",
    "','.join(a)"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "grade-third\n",
      "GRADE-THIRD\n",
      "Grade-Third\n",
      "['gRade', 'third']\n"
     ]
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "'gRade,third'"
      ]
     },
     "metadata": {},
     "execution_count": 2
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "source": [
    "num = 13\r\n",
    "if num % 2 == 0:\r\n",
    "    print('你的整数是偶数')\r\n",
    "else:\r\n",
    "    print('你的整数是奇数')"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "你的整数是奇数\n"
     ]
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "source": [
    "No = 2\r\n",
    "if No == 1:\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "elif No == 2:\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "elif No == 3:\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "elif No == 4:\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "elif No == 5:\r\n",
    "    print('编号：{}'.format(No))\r\n",
    "else:\r\n",
    "    print('erro')"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "编号：2\n",
      "编号：2\n"
     ]
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "source": [
    "num = 31\r\n",
    "if num % 3 == 0 and num % 5 == 0:\r\n",
    "    print('FizzBuzz')\r\n",
    "elif num % 3 == 0:\r\n",
    "    print('Fizz')\r\n",
    "elif num % 5 == 0:\r\n",
    "    print('Buzz')\r\n",
    "else:\r\n",
    "    print(str(num))"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "31\n"
     ]
    }
   ],
   "metadata": {}
  }
 ],
 "metadata": {
  "orig_nbformat": 4,
  "language_info": {
   "name": "python",
   "version": "3.9.6",
   "mimetype": "text/x-python",
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "pygments_lexer": "ipython3",
   "nbconvert_exporter": "python",
   "file_extension": ".py"
  },
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.9.6 64-bit"
  },
  "interpreter": {
   "hash": "b23ed511805502d1f463bd89c50b4ebd8bbef08b00bcefbe7d2d24d807191004"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}